<template>
  <div>
    <!-- <input
      type="text"
      :value="value"
      @input="$emit('input', $event.target.value)"
    /> -->
    <input :value="title" @input="$emit('update:title', $event.target.value)" />
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      default: '',
    },
    title: {
      type: String,
      default: '',
    },
  },
  data() {
    return {}
  },
  async created() {
    try {
      const data = await this.getData(1)
    } catch (e) {
      console.log(e)
    }

    const resolve1 = await Promise.resolve(100)
    console.log(resolve1)
  },
  methods: {
    getData(count) {
      return new Promise((resolve, reject) => {
        if (count % 2 === 0) resolve('成功')
        else reject('失败')
      })
    },
  },
}
</script>

<style scoped lang="scss"></style>
